//调用接口配置文件
import { request } from 'config/request'
import config from 'config/config'
// 定义接口

//新增
export async function addFun(params) {
    return request({
        url: `${config.aheadPlan}admin/monthlyPeport/monthlyPeport/add`,
        method: 'POST',
        data: params,
    });
  };

  //编辑
export async function editFun(params) {
    return request({
        url: `${config.aheadPlan}admin/monthlyPeport/monthlyPeport/edit`,
        method: 'PUT',
        data: params,
        headers: {
          'Content-type': 'application/json',
        },
    });
  };

//查询
export async function queryInfo(params) {
    return request({
        url: `${config.aheadPlan}admin/monthlyPeport/monthlyPeport/queryById`,
        method: 'GET',
        data: params,
    });
  };
//获取区域
export async function getProjectPermission(params) {
  return request({
      url: `${config.aheadPlan}system/login/getProjectPermission?userId=${params.userId}`,
      method: 'GET',
  });
};
 //获取城市
export async function findByCity(params) {
  return request({
      url: `${config.aheadPlan}admin/competitorWeekly/competitorWeekly/findByCity`,
      method: 'GET',
      data: params,
  });
};
// 获取县区
export async function queryAllAddress(params) {
  return request({
      url: `${config.aheadPlan}cityConfig/CityConfig/findByCity`,
      method: 'GET',
      data: params,
  });
};
// 获取图表数据
export async function queryMonthList(params) {
  return request({
      url: `${config.aheadPlan}admin/monthlyPeport/monthlyPeport/queryMonthList`,
      method: 'GET',
      data: params,
  });
};

// 获取系统计算
export async function getPriceRatio(params) {
  return request({
      url: `${config.aheadPlan}admin/monthlyPeport/monthlyPeport/getPriceRatio`,
      method: 'GET',
      data: params,
  });
};
